---@class UIBP_RoundTips_C:UUserWidget
---@field TB_AliveNum UTextBlock
---@field TB_PlayerNum UTextBlock
---@field TB_RoundNum UTextBlock
--Edit Below--
local UIBP_RoundTips = { 
	LastTime = 0;
	bStart = false;
}; 

--Construct
function UIBP_RoundTips:Construct()
	self.bCanEverTick = true
	self:SetVisibility(ESlateVisibility.Collapsed);
end
-- Construct 

function UIBP_RoundTips:Show(bShow, TeamIndex, PlayerKey,RoundNum,AliveNum)
	if bShow == true then
        self.bStart = true
        self:SetVisibility(ESlateVisibility.SelfHitTestInvisible);
        print("UIBP_RoundTips:Show");
        self.TB_RoundNum:SetText(string.format("%d",RoundNum))
        self.TB_AliveNum:SetText(string.format("%d",AliveNum))
        self.TB_PlayerNum:SetText(string.format("Player %d",TeamIndex));
        --[[if PlayerKey == Mode.OwnerPlayerKey then

            self.TB_PlayerNum:SetText("我");
        else 

            self.TextBlock_Content:SetText(string.format("Player %d",TeamIndex));
        end]]--
        self.LastTime = GameplayStatics.GetRealTimeSeconds(self)
    else
        self.bStart = false
    end
end

function UIBP_RoundTips:ShowAgain(bShow, TeamIndex, PlayerKey,RoundNum,AliveNum)
    if bShow == true then
        self.bStart = true
        self:SetVisibility(ESlateVisibility.SelfHitTestInvisible);
        print("UIBP_RoundTips:ShowAgain");
        self.TB_RoundNum:SetText(string.format("%d",RoundNum))
        self.TB_AliveNum:SetText(string.format("%d",AliveNum))
        self.TB_PlayerNum:SetText(string.format("Player %d",TeamIndex));
        --[[if PlayerKey == AeroplaneChessMode.OwnerPlayerKey then

            self.TextBlock_Content:SetText("我方再次投掷");
        else 

            self.TextBlock_Content:SetText(ETeameColor[TeamIndex].."方再次投掷");
        end--]]--
        self.LastTime = GameplayStatics.GetRealTimeSeconds(self)
    else
        self.bStart = false
    end
end

function UIBP_RoundTips:Tick(MyGeometry, InDeltaTime)
    if self.bStart == false then
        return
    end

    local Now = GameplayStatics.GetRealTimeSeconds(self)

    if Now >= self.LastTime + 1 then
        self:SetVisibility(ESlateVisibility.Collapsed);
        self.bStart = false;
    end 
    --[[if not UGCGameSystem.GameState.ShowThrowTips and Now >= self.LastTime + 1 then
        self:SetVisibility(ESlateVisibility.Collapsed);
        self.bStart = false;
    end]]--
end

-- function UIBP_RoundTips:Destruct()

-- end

return UIBP_RoundTips;